import java.io.*;
import java.util.*;
import java.math.*;
class RealSum {
public static Stack<BigDecimal> P;

public static void main(String args[]) {
		P = new Stack<BigDecimal>();
		fillListsWithNumbersFromAFile();
		BigDecimal sum = new BigDecimal(0);
		long startTime = System.currentTimeMillis();	
		while(P.size() > 0) {
			BigDecimal temp = P.pop();
                	sum = sum.add(temp);
		}
	
		long endTime = System.currentTimeMillis();
		System.out.println("time " + (endTime - startTime));
		float fsum = sum.floatValue();
		System.out.println(new BigDecimal(fsum));
	}

	public static void fillListsWithNumbersFromAFile() {
		try {
			Scanner sc = new Scanner(new File("numbers"));
			while(sc.hasNextDouble()) {
				float temp = sc.nextFloat();
				P.push(new BigDecimal(temp));
			}		
		}
		catch(FileNotFoundException e) {

		}	
	}
}
